#!/bin/bash

build_hook() {
	REQMODULES="kernel/crypto
                kernel/fs
                kernel/lib
                kernel/drivers/block
                kernel/drivers/ata
                kernel/drivers/md
                kernel/drivers/firewire
                kernel/drivers/input
                kernel/drivers/scsi
                kernel/drivers/message
                kernel/drivers/pcmcia
                kernel/drivers/virtio
                kernel/drivers/hid
                kernel/drivers/usb/host
                kernel/drivers/usb/storage"

	for mod in $REQMODULES; do
		FTGT="$FTGT /lib/modules/$KERNEL/$mod"
	done
	for modules in $(find $FTGT -type f -name "*.ko*" 2> /dev/null); do
		modules=$(echo ${modules%*.ko*})
		add_module $(basename $modules)
	done
}
